<?php
/*=============================================================================
|| ##################################################################
||	phpFoX Konsort
|| ##################################################################
||	
||	Copyright		: (C) 2005-2007 PHPFOX Limited a Reality Fox Creation
||	Contact			: info@phpfox.com
||
||	- phpFoX and all of its source code and files are protected by Copyright Laws. 
||
||	- The license for phpFoX permits you to install this software on a single domain (.com, .org, .net, etc.). 
||
||	- You may also not remove this copyright screen which shows the copyright information and credits for phpFoX (RealityFOX Creations). 
||
||	- phpFoX Konsort is NOT a FREE software - http://www.phpfox.com/license/
||
|| ##################################################################
=============================================================================*/

/* $File: ./include/modules/Account/classes/PhpFox_ComponentMyDetails.class.php, $Author:  $ */



/** User My Details
 * 
 * Parameters:
 *  1. oAcc (mandatory) - user account object
 * 
 * @package module.account
 * @version $Id: PhpFox_ComponentMyDetails.class.php 46 2007-12-14 23:12:21Z phpfoxsv $
 *   
 */
class PhpFox_Mod_Account_ComponentMyDetails extends BaseComponent
{

    /** Processing method
     */
	function process()
	{
		$oAcc = $this->getParam('oAcc');
	    assert($oAcc != null);

		$oCustomFieldService = &$this->_oModule->getService('CustomField');
	    /* @var $oCustomFieldService PhpFox_Mod_Account_ServiceCustomField */
		$oAcc->calcAge();
		$oAcc->calcStarSign();
		$oAcc->aData['star_sign_f'] = App::format('Mod_Account.star_sign.'.$oAcc->aData['star_sign']);

		$this->oTpl->assign(array(
		    'aUser'   => $oAcc->aData,
		    'aFields' => $oCustomFieldService->getFieldsForProfile($oAcc->aData['id']),
		));
		$this->oTpl->assignSrc(array(
			'sUserPicPath' => App::getParam('user.pic.url'),
		));
		
		$srcHtml = $this->oTpl->fetch('MyDetails.html');
		
		return $srcHtml;
	}

}
?>